package pishen;

import java.io.Serializable;

public class Node implements Serializable{
	private static final long serialVersionUID = -4373677901249547274L;
	private int remainLife, givenLife;

	public Node(){
		this.remainLife = LifeGenerator.gen();
		this.givenLife = remainLife;
	}
	
	public Node(int life){
		this.remainLife = life;
	}
	
	public int getRemainLife() {
		return remainLife;
	}
	
	public int getGivenLife(){
		return givenLife;
	}

	public void setRemainLife(int life) {
		this.remainLife = life;
	}

	@Override
	public String toString() {
		return " " + remainLife + " ";
	}
	
}
